package com.greenline.push.core.pushcenter.impl;

import org.springframework.beans.factory.annotation.Autowired;

import com.greenline.push.core.pushcenter.ClassBatchDefineManager;
import com.greenline.push.dal.pushcenter.ClassBatchDefineDAO;
import com.greenline.push.dal.pushcenter.dataobject.ClassBatchDefineDO;
import com.greenline.push.dal.query.ClassBatchDefineQuery;

public class ClassBatchDefineManagerImpl implements ClassBatchDefineManager {

	@Autowired
	private ClassBatchDefineDAO batchDAO;

	@Override
	public Long insert(ClassBatchDefineDO batchDO) {
		return batchDAO.insert(batchDO);
	}

	@Override
	public ClassBatchDefineDO getClassBatchDefineById(Long id) {
		return batchDAO.getClassBatchDefineById(id);
	}

	@Override
	public boolean update(ClassBatchDefineDO batchDO) {
		return batchDAO.update(batchDO) > 0;
	}

	@Override
	public ClassBatchDefineQuery listByQuery(ClassBatchDefineQuery query) {
		return batchDAO.listByQuery(query);
	}

	@Override
	public boolean delete(Long id) {
		return batchDAO.delete(id) > 0;
	}

}
